<!DOCTYPE html>
<html>
	<head>
		<title> 个人中心</title>
		<meta name="keywords" content="" />
		<meta name="description" content="">
		<include file="public@head" />
		<style>
			.control-label {
				font-weight: bold;
				float: left;
				width: 70px;
			}
		.btn-warning1 {
		    
		    color: #eea236;
		}
		</style>
	</head>
	<body class="body-white" id="top">
		<div class="container">
			<div class="row">
				<div class="tabs">
					<div class="tab-content">
						<div class="tab-pane active" id="one">
							<div class="wrap js-check-wrap" style="margin-top:3rem;">
								<form class="well form-inline margin-top-20" method="post" action="{:url('Stream/index')}">
									<!-- 订单号:
									<input type="text" class="form-control" name="orderNo" id="orderNo" style="width: 120px;" value="" placeholder="订单号"> 
									会员卡号:
									<input type="text" class="form-control" name="cardid" id="cardid" style="width: 120px;" value="" placeholder="会员卡号"> -->									
									时间:
									<input type="text" class="form-control js-bootstrap-date" name="start_time" id="start_time" value="{:input('request.start_time')}" style="width: 140px;" autocomplete="off">-
									<input type="text" class="form-control js-bootstrap-date" name="end_time" id="end_time" value="{:input('request.end_time')}" style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
									<input type="submit" class="btn btn-success" value="搜索" />
									<a class="btn btn-warning" href="{:url('Stream/index')}">清空</a>
									<!-- <a title="数据导出" onclick="exportdata()" id="export" class="btn btn-success" style="margin-left: 10px;">数据导出</a> -->
								</form>
								<table class="table table-hover table-bordered table-striped">
								<thead>
                                    <tr style="text-align: center;">
									<foreach name="type" item="vo">					
									<th>{$vo.typename}：{$vo.total}</th>
									</foreach>
									</tr>
                                    </thead>
                                    <thead>
                                        <tr>
                                            <th align="left">应付金额:￥{$totalMoney}</th>
                                            <th align="left">优惠金额:￥{$zhekou}</th>
                                            <th align="left">实卖金额:￥{$sum['sum']}</th>
                                            <th align="left">已完成订单:{$num}单</th>
                                        </tr>
                                    </thead>
                                </table>
                                <div style="height:350px;overflow-y:auto;">
								<table class="table table-hover table-bordered table-striped">
									<thead>
										<tr style="text-align: center;">
											<th align="left"> 编号</th>
											<th width="40" hidden > ID</th>
											<th align="left" hidden>订单号</th>
											<th align="left">流水号</th>
											<th align="left">会员</th>
											<!-- <th align="left">会员卡号</th> -->
											<th align="left">收银员</th>
											<th align="left">销售金额</th>
											<th align="left">实收金额</th>
											<th align="left">优惠金额</th>
											<th align="left">付款金额</th>
											<th align="left">找零</th>
											<th align="left">付款类型</th>
											<th align="left">付款状态</th>
											<!-- <th align="left">店铺</th>-->
											<th align="left">收银时间</th>
											<th width="160">操作</th>
										</tr>
									</thead>
									<tbody>
										<foreach name="list" item="vo" key='k'>
											<tr style="text-align: center;">
												<td ><php>
												if(isset($_GET['page'])){
													echo $k+1+8*($_GET['page']-1);
												}else{
													echo $k+1;
												}
												</php></td><!-- 编号 -->
												<td hidden>{$vo.id}</td>
												<td hidden>{$vo.orderNo}</td>
												<td >{$vo.num}</td>
												<td>{:get_member_data($vo['userid'],'uname')}</td>
												<!-- <td>{$vo.cardid}</td> -->
												<td>{:get_operator_data($vo['operatorid'],'user_login')}</td>
												<td>{$vo.totalMoney}</td>
												<td>{$vo.actualMoney}</td>
												<td>{$vo.discount}</td>
												<td>{$vo.getMoney}</td>
												<td>{$vo.giveChange}</td>
												<td>{$vo['payType']|get_pay_type_val}</td>
												<td>{$vo.payStatus|get_pay_status}</td>
												<!-- <td>{:get_store_data($vo['storeid'],'store_name')}</td> -->
												<td>{$vo.ctime|time_format}</td>
												<td style='display:none;' id="id">{$vo.id}</td>
												<td class="text-center">
													<a onclick="see({$vo['id']})" class="text-success" >订单详情</a>
												<if condition="$vo.payStatus gt 0">
												<a href='{:url("stream/refund",array("id"=>$vo.orderNo))}' class="text-success" >退款</a>
												</if>
												</td>
											</tr>
										</foreach>
									</tbody>
								</table>
								</div>
								<div class="pagination">{$page}</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script src="__STATIC__/js/frontend.js"></script>
		<!-- /container -->
		<include file="public@scripts" />
		
       <script src="__STATIC__/js/layer/layer.js"></script>
		<script>
    function see(id){
    	var id=id;
        layer.open({
            type: 2,
            title: '订单详情',
            shadeClose: true,
            shade: false,
            maxmin: false, //开启最大化最小化按钮
            area: ['100%', '100%'],
            content: '../stream/detail?id='+id//视图路径
        });
    }
</script>
	</body>
</html>